package com.hist.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @auther Ren Gaoshuai
 * @date 2021-04-06 12:44
 **/

/*等价于在配置文件中配置了一个bean*/
@Component()
public class User {

    @Value("兄弟")
    public String name;

    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                '}';
    }
}
